package com.itheima.service.impl;

import com.github.pagehelper.PageHelper;
import com.itheima.dao.SyslogDao;
import com.itheima.domain.SysLog;
import com.itheima.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * ClassName:SysLogServiceImpl
 * Package:com.itheima.service.impl
 * Description:
 * Date:2020/3/14 0:39
 * User: snow
 */
@Service
@Transactional
public class SysLogServiceImpl implements SysLogService {

	@Autowired
	private SyslogDao syslogDao;

	@Override
	public void save(SysLog syslog) throws Exception {
		syslogDao.save(syslog);
	}

	@Override
	public List<SysLog> findAll(int page, int size) throws Exception {
		/**
		 * //参数配置
		 * pageNum 页码值   pageSize  每页最大值
		 */
		PageHelper.startPage(page,size);
		return syslogDao.findAll();
	}
}
